package com.zzty.txj.dao;

import com.zzty.txj.entity.Location;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface LocationMapper {
    @Insert("insert into location(name,x,y) values(#{name},#{x},#{y}) ")
    public Integer insertLocation(Location location);

    @Select("select * from location")
    public List<Location> getLocations();

    @Delete("delete from location where id=#{id}")
    public Integer deleteLocation(Location location);

}
